import service from '@/utils/request'


// 获取产品
export const getProduct = (params) => {
    return service({
        method: 'get',
        url: '/pro/getProduct',
        params
    })
}

// 添加产品
export const addProduct = (data) => {
    return service({
        method: 'post',
        url: '/pro/addProduct',
        data
    })
}

// 修改产品
export const editProduct = (data) => {
    return service({
        method: 'post',
        url: '/pro/editProduct',
        data
    })
}

// 删除产品
export const deleteProduct = (params) => {
    return service({
        method: 'get',
        url: '/pro/deleteProduct',
        params
    })
}

// 申请出库
export const applyProduct = (data) => {
    return service({
        method: 'post',
        url: '/pro/applyProduct',
        data
    })
}

// 获取产品审核列表
export const getApplyProduct = (params) => {
    return service({
        method: 'get',
        url: '/pro/getApplyProduct',
        params
    })
}

// 审核产品
export const auditProduct = (data) => {
    return service({
        method: 'post',
        url: '/pro/auditProduct',
        data
    })
}

// 获取出库列表
export const getOutproduct = (params) => {
    return service({
        method: 'get',
        url: '/pro/getOutproduct',
        params
    })
}

// 撤回申请
export const withdraw = (params) => {
    return service({
        method: 'get',
        url: '/pro/withdraw',
        params
    })
}
